<?php
/* @var $this EmailTempletController */
/* @var $model EmailTemplet */

$this->breadcrumbs=array(
	Yii::t('EventEmailTemplate','Email Templets')=>array('admin'),
	Yii::t('base','Manage'),
);
Yii::app()->clientScript->registerScript('search', "
$('#search-form form').submit(function(){
	$('#event-email-template-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>
<div class="row-fluid">
	<div class="span12">
    	<div class="box gradient">
        	<div class="title">
           	<?php echo CHtml::link(Yii::t('common','Advanced Search'),'#collapseOne',array('class'=>'search-button accordion-toggle collapsed btn btn-mini zyBtn03','data-toggle'=>'collapse','data-parent'=>'#accordion2')); ?>
             <?php echo CHtml::link(Yii::t('common','Create'), array('create'),array('class'=>'btn btn-small create',));?>              <h3> <i class="icon-sitemap"></i> <span><?php echo Yii::t('EventEmailTemplet','Manage Email Templets') ?></span> </h3>
            </div>
            
			<div class="content"> 
			
 			<!--search start-->
 			
              <?php $this->renderPartial('_search',array(
					'model'=>$model,
				)); ?>
              
            <!--search over-->
            
            <!-- table start -->
            
<?php $this->widget('application.extensions.zgrid.ZGridView', array(
	'id'=>'event-email-template-grid',
	'dataProvider'=>$model->search(),
	'itemsCssClass'=>'responsive table table-striped table-bordered',
	'pager'=>array('class'=>'CLinkPager','hiddenPageCssClass'=>'','firstPageCssClass'=>'first paginate_button','htmlOptions'=>array('class'=>'dataTables_paginate paging_full_numbers"'),'header'=>""),
	'pagerCssClass'=>'pagination',
	'cssFile'=>false,
	'template'=>'{items}{summary}{pager}',
	'columns'=>array(
	array (
			'name' => 'event_id',
			'headerHtmlOptions' => array (
				'style' => 'width:10%'
			),
			'value' => 'Event::model()->getEventTitle($data->event_id)'
		),
		array (
			'name' => 'email_title',
			'headerHtmlOptions' => array (
				'style' => 'width:10%'
			)
		),
		array (
			'name' => 'message_en',
			'headerHtmlOptions' => array (
				'style' => 'width:10%'
			)
		),
		array (
			'name' => 'message_cn',
			'headerHtmlOptions' => array (
				'style' => 'width:10%'
			)
		),
		/*
		array('name'=>'is_delete','headerHtmlOptions'=>array('style'=>'width:10%')),
		array('name'=>'remark','headerHtmlOptions'=>array('style'=>'width:10%')),
		array('name'=>'create_time','headerHtmlOptions'=>array('style'=>'width:10%')),
		array('name'=>'create_user','headerHtmlOptions'=>array('style'=>'width:10%')),
		array('name'=>'update_time','headerHtmlOptions'=>array('style'=>'width:10%')),
		array('name'=>'update_user','headerHtmlOptions'=>array('style'=>'width:10%')),
		array('name'=>'is_award','headerHtmlOptions'=>array('style'=>'width:10%')),
		*/
		array(
			'class'=>'CButtonColumn',
			'header' => Yii::t ( 'common', 'Operater' ),
			'template'=>'{view} {update} {delete}',
			'headerHtmlOptions'=>array('style'=>'width:10%'),
	    	'buttons'=>array (
		        'update'=> array(
		            'label'=>'<i class="gicon-edit"></i>',
		            'imageUrl'=>0,
		            'options'=>array( 'class'=>'btn btn-small','rel'=>'tooltip','data-placement'=>'left','title'=>Yii::t('common','Update')),
		        ),
		        'view'=>array(
		            'label'=>'<i class="gicon-eye-open"></i>',
		            'imageUrl'=>0,
		            'options'=>array('class'=>'btn btn-small','rel'=>'tooltip','data-placement'=>'left','title'=>Yii::t('common','View')),
		        ),
		        'delete'=>array(
		            'label'=>'<i class="gicon-remove icon-white"></i>',
		            'imageUrl'=>0,
		             'options'=>array( 'class'=>'btn btn-inverse btn-small','rel'=>'tooltip','data-placement'=>'left','title'=>Yii::t('common','Delete')),
		        ),
		     ),
	    ),
	),
)); ?>
					<!--table over -->
			</div><!--//content-->
		</div><!--//box-->
	</div><!--//span12-->
</div><!--//row-fluid-->
